package homework;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2024-08-28
 * Time: 11:13
 */
public class GameTest {
    public static void main(String[] args) {
        Role r1 = new Role("熊大",100);
        Role r2 = new Role("熊二",100);
        //开始进攻
        while(true){
            //r1打r2
            r1.attack(r2);
            if(r2.getBlood() == 0){
                System.out.println(r1.getName() + " K.O " + r2.getName());
                break;
            }

            //r2打r1
            r2.attack(r1);
            if(r1.getBlood() == 0){
                System.out.println(r2.getName() + " K.O " + r1.getName());
                break;
            }
        }
    }
}
